<template>
   <div> 
      <el-form ref="current_user" :model="current_user" label-width="80px">
         <el-form-item label="用户昵称">
            <el-input v-model="current_user.name"></el-input>
         </el-form-item>
         <el-form-item label="用户ID">
            <el-input v-model="current_user.name"></el-input>
         </el-form-item>
         <el-form-item label="用户头像">
            
         </el-form-item>
         <el-form-item label="创建时间">
            <el-col :span="11">
               <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
            </el-col>
            <el-col class="line" :span="2">-</el-col>
            <el-col :span="11">
               <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
            </el-col>
         </el-form-item>
         <el-form-item label="更新时间">
            <el-col :span="11">
               <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
            </el-col>
            <el-col class="line" :span="2">-</el-col>
            <el-col :span="11">
               <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
            </el-col>
         </el-form-item>
         <el-form-item>
            <el-button type="primary" @click="onSubmit">更新用户信息</el-button>
         </el-form-item>
         </el-form>
      <el-table
      :data="permissionList"
      style="width: 100%">
      <el-table-column
        prop="permissionCode"
        label="日期"
        width="180">
      </el-table-column>
      <el-table-column
        prop="permissionName"
        label="姓名"
        width="180">
      </el-table-column>
    </el-table>
   </div>
   
</template>

<script>
export default {
   name:'User',
   data(){
      return{
         permissionList:[]
      }
   },
   methods:{
      getPermissions(){
            this.$http({
                method:'get',
                url:'common/tPermission/getAll',
                data:{}
            }).then(res=>{
                console.log(res);
                let {code,msg,data} = res;
                
                this.permissionList = data.data;
            })
        }
   },
   mounted:function () {   //自动触发写入的函数
            this.getPermissions();
   }
}
</script>